//
//  TeamCollectionViewCell.m
//  A_HandHeldLOL
//
//  Created by Zhao YanBin on 16/1/18.
//  Copyright © 2016年 zhaoyanbin. All rights reserved.
//

#import "TeamCollectionViewCell.h"

@implementation TeamCollectionViewCell

-(instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        //图片
        self.tu = [[UIImageView alloc] init];
        _tu.backgroundColor = [UIColor whiteColor];
        _tu.layer.cornerRadius = 35;
        _tu.clipsToBounds = YES;
        [self.contentView addSubview:_tu];
        [_tu release];
        
        //名字
        self.name = [[UILabel alloc] init];
//        _name.backgroundColor = [UIColor yellowColor];
        self.name.textColor = [UIColor whiteColor];
        _name.textAlignment = NSTextAlignmentCenter;
        [self.contentView addSubview:_name];
        [_name release];
    }
    return  self;
}

-(void)applyLayoutAttributes:(UICollectionViewLayoutAttributes *)layoutAttributes
{
    [super layoutSubviews];
    _tu.frame = CGRectMake(0, 10, layoutAttributes.size.width, layoutAttributes.size.height - 40);
    _name.frame = CGRectMake(0, layoutAttributes.size.height - 30, layoutAttributes.size.width, 40);
}
@end
